package com.yuewi.consumer;

import com.yuewi.consumer.proxy.ServiceProxyFactory;
import com.yuwei.common.model.User;
import com.yuwei.common.service.UserService;

/**
 * 用户服务
 *
 * @author yuwei
 * @date 12:40 2024/10/3
 */
public class EasyConsumerExample {
    public static void main(String[] args) {
        //获取UserService实例
        User user = new User("yuwei");
        // 动态代理
        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        User result = userService.getUser(user);
        System.out.println(result);

    }
}
